package com.qfedu.provider.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * 粉丝。关注我的
 * @TableName db_funs
 */
@TableName(value ="db_funs")
@Data
@NoArgsConstructor
public class DbFuns implements Serializable {
    /**
     * 粉丝表主键id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 我的id
     */
    private Integer userId;

    /**
     * 粉丝的id
     */
    private Integer fanId;

    /**
     * 关注状态  1关注，0取消
     */
    private Integer status;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public DbFuns(Integer userId, Integer fanId, Integer status) {
        this.userId = userId;
        this.fanId = fanId;
        this.status = status;
        this.createTime = new Date();
        this.updateTime = new Date();
    }
}